1. Technical Field
The present invention relates in general to a power management scheme in a data processing system which provides an accurate reflection of the hardware devices currently attached to the data processing system after the data processing system is resumed from a suspended state, even if devices have been removed, added, or changed while the system was suspended, and in particular to a power management scheme which also restores the configuration of devices present both when the data processing system is suspended and when it is resumed. Still more particularly, the present invention relates to a power management scheme which shifts responsibility for reconfiguring devices away from the individual device drivers so that less time is required to re-awaken the data processing system, less code is required to allow power management for all devices, and the same device drivers may be utilized on both power managed and non-power managed operating systems.
2. Description of the Related Art
Power management is a means of conserving power on battery operated data processing systems. The data processing system and its devices are put into various states of suspension in order to reduce the drain on the battery. The data processing system is commanded into these various states when it is determined that utilization of the data processing system and its devices is not needed. For example, if data has not been written to the hard drive for a given period of time, the drive ceases to spin in order to conserve energy.
Current power management software implementations require software controlling the device to be power management aware. Often this requires the software to conform to a standard such as Advanced Power Management (APM) or to register for suspend/resume notification. Typically, when the power management component determines that the data processing system should go into a suspend state, it notifies all registered clients that it is going into a suspend state. Likewise, when the power management component determines it is necessary to resume the power level on the data processing system, it notifies registered clients of this impending event. Current implementations require the device driver, or client, to restore the device configuration.
In order for a device or adapter attached to a base system device to have its configuration restored, the device driver, or client, must be power management enabled. Each client must contain code to handle the suspend/resume event and reinstate the device configuration.
Current implementations of power management software also assume that the same set of devices present when the data processing system was suspended are also present when the data processing system is resumed, which is not always the case. For example, a portable data processing system could be suspended while connected to a docking station, but removed from the docking station while still in the suspended state. When the data processing system is resume, current implementations would attempt to restore the data processing system as though it were still connected to the docking station.
Therefore, it would be desirable to have a power management system which accurately reports the hardware topology of the data processing system when it resumes from suspended state. It would also be desirable for such a power management system to shift responsibility for reconfiguring devices away from individual device drivers.